<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">

<title>class RFF::Processor - RDoc Documentation</title>

<link href="../fonts.css" rel="stylesheet">
<link href="../rdoc.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
</script>

<script src="../js/jquery.js"></script>
<script src="../js/navigation.js"></script>
<script src="../js/search_index.js"></script>
<script src="../js/search.js"></script>
<script src="../js/searcher.js"></script>
<script src="../js/darkfish.js"></script>


<body id="top" role="document" class="class">
<nav role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="../index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  

  <div id="class-metadata">
    
    <div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  
  <p class="link">Object
  
</div>

    
    
    <!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    
    <li ><a href="#method-c-new">::new</a>
    
    <li ><a href="#method-i-audio_input_bitrate2">#audio_input_bitrate2</a>
    
    <li ><a href="#method-i-audio_input_channelmode">#audio_input_channelmode</a>
    
    <li ><a href="#method-i-audio_input_format">#audio_input_format</a>
    
    <li ><a href="#method-i-audio_input_format_type">#audio_input_format_type</a>
    
    <li ><a href="#method-i-audio_input_frequency">#audio_input_frequency</a>
    
    <li ><a href="#method-i-audio_input_metadata">#audio_input_metadata</a>
    
    <li ><a href="#method-i-audio_output_bitrate2">#audio_output_bitrate2</a>
    
    <li ><a href="#method-i-audio_output_channelmode">#audio_output_channelmode</a>
    
    <li ><a href="#method-i-audio_output_format">#audio_output_format</a>
    
    <li ><a href="#method-i-audio_output_format_type">#audio_output_format_type</a>
    
    <li ><a href="#method-i-audio_output_frequency">#audio_output_frequency</a>
    
    <li ><a href="#method-i-audio_output_metadata">#audio_output_metadata</a>
    
    <li ><a href="#method-i-audio_stream_mapping">#audio_stream_mapping</a>
    
    <li ><a href="#method-i-command">#command</a>
    
    <li ><a href="#method-i-command_exit_status">#command_exit_status</a>
    
    <li ><a href="#method-i-common_input_metadata">#common_input_metadata</a>
    
    <li ><a href="#method-i-common_output_metadata">#common_output_metadata</a>
    
    <li ><a href="#method-i-conversion_type">#conversion_type</a>
    
    <li ><a href="#method-i-custom_args">#custom_args</a>
    
    <li ><a href="#method-i-detected_output_type">#detected_output_type</a>
    
    <li ><a href="#method-i-ffmpeg_build_line">#ffmpeg_build_line</a>
    
    <li ><a href="#method-i-ffmpeg_version_line">#ffmpeg_version_line</a>
    
    <li ><a href="#method-i-fire">#fire</a>
    
    <li ><a href="#method-i-format_processing_percentage">#format_processing_percentage</a>
    
    <li ><a href="#method-i-full_output_path">#full_output_path</a>
    
    <li ><a href="#method-i-input">#input</a>
    
    <li ><a href="#method-i-input_bitrate">#input_bitrate</a>
    
    <li ><a href="#method-i-input_duration">#input_duration</a>
    
    <li ><a href="#method-i-input_start">#input_start</a>
    
    <li ><a href="#method-i-input_type">#input_type</a>
    
    <li ><a href="#method-i-kill">#kill</a>
    
    <li ><a href="#method-i-output_name">#output_name</a>
    
    <li ><a href="#method-i-output_path">#output_path</a>
    
    <li ><a href="#method-i-output_type">#output_type</a>
    
    <li ><a href="#method-i-parser_status">#parser_status</a>
    
    <li ><a href="#method-i-processing_percentage">#processing_percentage</a>
    
    <li ><a href="#method-i-processing_status">#processing_status</a>
    
    <li ><a href="#method-i-quality">#quality</a>
    
    <li ><a href="#method-i-raw_command_output">#raw_command_output</a>
    
    <li ><a href="#method-i-status">#status</a>
    
    <li ><a href="#method-i-video_input_additional">#video_input_additional</a>
    
    <li ><a href="#method-i-video_input_colorspace">#video_input_colorspace</a>
    
    <li ><a href="#method-i-video_input_format">#video_input_format</a>
    
    <li ><a href="#method-i-video_input_metadata">#video_input_metadata</a>
    
    <li ><a href="#method-i-video_input_resolution">#video_input_resolution</a>
    
    <li ><a href="#method-i-video_output_additional">#video_output_additional</a>
    
    <li ><a href="#method-i-video_output_colorspace">#video_output_colorspace</a>
    
    <li ><a href="#method-i-video_output_format">#video_output_format</a>
    
    <li ><a href="#method-i-video_output_metadata">#video_output_metadata</a>
    
    <li ><a href="#method-i-video_output_resolution">#video_output_resolution</a>
    
    <li ><a href="#method-i-video_stream_mapping">#video_stream_mapping</a>
    
  </ul>
</div>

  </div>
</nav>

<main role="main" aria-labelledby="class-RFF::Processor">
  <h1 id="class-RFF::Processor" class="class">
    class RFF::Processor
  </h1>

  <section class="description">
    
<p>The main processing class of the <em>rff</em> gem. It spawns FFmpeg
conversion process and parses its output, providing information about input
and output files and current process status</p>

  </section>

  
  
  
  <section id="5Buntitled-5D" class="documentation-section">
    

    

    

    

    
     <section id="public-class-5Buntitled-5D-method-details" class="method-section">
       <header>
         <h3>Public Class Methods</h3>
       </header>

    
      <div id="method-c-new" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">new</span><span
            class="method-args">(input, output_type, output_path=nil, quality="5000k", custom_args=nil, recommended_audio_quality=true, disable_subtitles_decoding=true)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This constructor initializes the class with the following arguments:</p>
<ul><li>
<p><em>input</em> <strong>(required)</strong> - the full path to the input
file</p>
</li><li>
<p><em>output_type</em> <strong>(required)</strong> - defines the type of the
output. Must be one of [:mp3, :ogg, :wav] for audio conversion or [:mp4,
:ogv, :webm] for video conversion</p>
</li><li>
<p><em>output_path</em> - a path to place the output file in. Defaults to nil,
which means that the input&#39; s directory path is used</p>
</li><li>
<p><em>quality</em> - only affects video conversion. Sets the video conversion
quality. Defaults to 5000k, which is tested value for good video conversion
quality</p>
</li><li>
<p><em>custom_args</em> - passes custom arguments to FFmpeg. Defaults to nil,
which means no custom arguments are given</p>
</li><li>
<p><em>recommended_audio_quality</em> - determines if recommended by FFmpeg
community audio quality settings should be used. Defaults to true, which
means audio conversion with good, recommended quality. Set to false if you
are giving additional arguments that determine this quality.</p>
</li><li>
<p><em>disable_subtitles_decoding</em> - in some formats subtitle decoding
causes problems. This option disables this feature. Defaults to true to
bypass problems by default.</p>
</li></ul>

<p>This method also validates arguments, determines full output name,
generates appropriate FFmpeg command, determines conversion type and
initializes status (it is :pending at this point).</p>
          
          

          
          <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 21</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output_type</span>, <span class="ruby-identifier">output_path</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">quality</span>=<span class="ruby-string">&quot;5000k&quot;</span>, <span class="ruby-identifier">custom_args</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">recommended_audio_quality</span>=<span class="ruby-keyword">true</span>, <span class="ruby-identifier">disable_subtitles_decoding</span>=<span class="ruby-keyword">true</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">input</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">input</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">output_type</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">RFF</span><span class="ruby-operator">::</span><span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;Input and output type can not be empty nor nil!&quot;</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span>[<span class="ruby-value">:mp3</span>, <span class="ruby-value">:ogg</span>, <span class="ruby-value">:wav</span>, <span class="ruby-value">:mp4</span>, <span class="ruby-value">:webm</span>, <span class="ruby-value">:ogv</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">output_type</span>.<span class="ruby-identifier">to_sym</span>)
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">RFF</span><span class="ruby-operator">::</span><span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;Output type must be one of [:mp3, :ogg, :wav, :mp4, :webm, :ogv]!&quot;</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@input</span> = <span class="ruby-identifier">input</span>
  <span class="ruby-ivar">@output_type</span> = <span class="ruby-identifier">output_type</span>
  <span class="ruby-ivar">@output_name</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-ivar">@input</span>).<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;.&quot;</span>)[<span class="ruby-value">0</span>]
  <span class="ruby-ivar">@output_path</span> = <span class="ruby-identifier">output_path</span> <span class="ruby-operator">||</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">input</span>)
  <span class="ruby-ivar">@quality</span> = <span class="ruby-identifier">quality</span>
  <span class="ruby-ivar">@custom_args</span> = <span class="ruby-identifier">custom_args</span>
  <span class="ruby-keyword">if</span> [<span class="ruby-value">:mp3</span>, <span class="ruby-value">:ogg</span>, <span class="ruby-value">:wav</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@output_type</span>)
    <span class="ruby-ivar">@command</span> = <span class="ruby-string">&quot;ffmpeg -y -i &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot;#{@input}&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot; -acodec #{@output_type == :mp3 ? &quot;libmp3lame&quot; : (@output_type == :ogg ? &quot;libvorbis&quot; : &quot;pcm_s16le&quot;)}#{recommended_audio_quality ? (@output_type == :mp3 ? &quot; -aq 2&quot; : (@output_type == :ogg ? &quot; -aq 4&quot; : &quot;&quot;)) : &quot;&quot;}#{disable_subtitles_decoding ? &quot; -sn&quot; : &quot;&quot;}#{@custom_args.nil? ? &quot;&quot; : &quot; #{@custom_args}&quot;} &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot;#{@output_path}/#{@output_name}.#{@output_type.to_s}&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span>
    <span class="ruby-ivar">@conversion_type</span> = <span class="ruby-value">:audio</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-ivar">@command</span> = <span class="ruby-string">&quot;ffmpeg -y -i &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot;#{@input}&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot; -acodec #{(@output_type == :webm || @output_type == :ogv) ? &quot;libvorbis&quot; : &quot;aac&quot;} -vcodec #{@output_type == :webm ? &quot;libvpx&quot; : (@output_type == :ogv ? &quot;libtheora&quot; : &quot;mpeg4&quot;)}#{@output_type == :mp4 ? &quot; -strict -2&quot; : &quot;&quot;}#{(!@quality.nil? &amp;&amp; !@quality.empty?) ? &quot; -b:v #{@quality}&quot; : &quot;&quot;}#{recommended_audio_quality ? (@output_type == :webm || @output_type == :ogv ? &quot; -aq 4&quot; : &quot; -b:a 240k&quot;) : &quot;&quot;}#{disable_subtitles_decoding ? &quot; -sn&quot; : &quot;&quot;}#{@custom_args.nil? ? &quot;&quot; : &quot; #{@custom_args}&quot;} &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot;#{@output_path}/#{@output_name}.#{@output_type.to_s}&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span>
    <span class="ruby-ivar">@conversion_type</span> = <span class="ruby-value">:video</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@status</span> = <span class="ruby-value">:pending</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
    </section>
  
     <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
       <header>
         <h3>Public Instance Methods</h3>
       </header>

    
      <div id="method-i-audio_input_bitrate2" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_input_bitrate2</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns bitrate of audio input (from input information line)</p>
          
          

          
          <div class="method-source-code" id="audio_input_bitrate2-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 535</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_input_bitrate2</span>
  <span class="ruby-ivar">@audio_input_bitrate2</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_input_channelmode" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_input_channelmode</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns channel mode (eg. mono, stereo) of audio input</p>
          
          

          
          <div class="method-source-code" id="audio_input_channelmode-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 523</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_input_channelmode</span>
  <span class="ruby-ivar">@audio_input_channelmode</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_input_format" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_input_format</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns format of audio input</p>
          
          

          
          <div class="method-source-code" id="audio_input_format-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 511</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_input_format</span>
  <span class="ruby-ivar">@audio_input_format</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_input_format_type" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_input_format_type</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns type of format of audio input</p>
          
          

          
          <div class="method-source-code" id="audio_input_format_type-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 529</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_input_format_type</span>
  <span class="ruby-ivar">@audio_input_format_type</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_input_frequency" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_input_frequency</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns frequency of audio input</p>
          
          

          
          <div class="method-source-code" id="audio_input_frequency-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 517</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_input_frequency</span>
  <span class="ruby-ivar">@audio_input_freq</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_input_metadata" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_input_metadata</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns metadata for audio input stream as a hash with keys
being symbols representing each metadata downcased name</p>
          
          

          
          <div class="method-source-code" id="audio_input_metadata-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 427</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_input_metadata</span>
  <span class="ruby-ivar">@input_meta_audio</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_output_bitrate2" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_output_bitrate2</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns bitrate of audio output (from output information line)</p>
          
          

          
          <div class="method-source-code" id="audio_output_bitrate2-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 565</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_output_bitrate2</span>
  <span class="ruby-ivar">@audio_output_bitrate2</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_output_channelmode" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_output_channelmode</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns channel mode (eg. mono, stereo) of audio output</p>
          
          

          
          <div class="method-source-code" id="audio_output_channelmode-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 553</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_output_channelmode</span>
  <span class="ruby-ivar">@audio_output_channelmode</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_output_format" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_output_format</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns format of audio output</p>
          
          

          
          <div class="method-source-code" id="audio_output_format-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 541</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_output_format</span>
  <span class="ruby-ivar">@audio_output_format</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_output_format_type" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_output_format_type</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns type of format of audio output</p>
          
          

          
          <div class="method-source-code" id="audio_output_format_type-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 559</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_output_format_type</span>
  <span class="ruby-ivar">@audio_output_format_type</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_output_frequency" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_output_frequency</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns frequency of audio output</p>
          
          

          
          <div class="method-source-code" id="audio_output_frequency-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 547</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_output_frequency</span>
  <span class="ruby-ivar">@audio_output_freq</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_output_metadata" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_output_metadata</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns metadata for audio output stream as a hash with keys
being symbols representing each metadata downcased name</p>
          
          

          
          <div class="method-source-code" id="audio_output_metadata-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 445</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_output_metadata</span>
  <span class="ruby-ivar">@output_meta_audio</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-audio_stream_mapping" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">audio_stream_mapping</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns audio stream mapping information (input_format -&gt;
output_format)</p>
          
          

          
          <div class="method-source-code" id="audio_stream_mapping-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 463</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">audio_stream_mapping</span>
  <span class="ruby-ivar">@stream_mapping_audio</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-command" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">command</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns the FFmpeg command used for conversion</p>
          
          

          
          <div class="method-source-code" id="command-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 379</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">command</span>
  <span class="ruby-ivar">@command</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-command_exit_status" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">command_exit_status</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns the exit status of the FFmpeg command</p>
          
          

          
          <div class="method-source-code" id="command_exit_status-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 631</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">command_exit_status</span>
  <span class="ruby-ivar">@exit_status</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-common_input_metadata" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">common_input_metadata</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns common metadata for input streams as a hash with keys
being symbols representing each metadata downcased name</p>
          
          

          
          <div class="method-source-code" id="common_input_metadata-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 421</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">common_input_metadata</span>
  <span class="ruby-ivar">@input_meta_common</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-common_output_metadata" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">common_output_metadata</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns common metadata for output streams as a hash with keys
being symbols representing each metadata downcased name</p>
          
          

          
          <div class="method-source-code" id="common_output_metadata-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 439</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">common_output_metadata</span>
  <span class="ruby-ivar">@output_meta_common</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-conversion_type" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">conversion_type</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns conversion type (:audio or :video)</p>
          
          

          
          <div class="method-source-code" id="conversion_type-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 391</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">conversion_type</span>
  <span class="ruby-ivar">@conversion_type</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-custom_args" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">custom_args</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns custom arguments passed to FFmpeg</p>
          
          

          
          <div class="method-source-code" id="custom_args-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 385</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">custom_args</span>
  <span class="ruby-ivar">@custom_args</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-detected_output_type" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">detected_output_type</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns output type read by FFmpeg</p>
          
          

          
          <div class="method-source-code" id="detected_output_type-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 355</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">detected_output_type</span>
  <span class="ruby-ivar">@detected_output_type</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-ffmpeg_build_line" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">ffmpeg_build_line</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns FFmpeg build line</p>
          
          

          
          <div class="method-source-code" id="ffmpeg_build_line-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 481</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">ffmpeg_build_line</span>
  <span class="ruby-ivar">@ff_buildline</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-ffmpeg_version_line" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">ffmpeg_version_line</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns FFmpeg version line</p>
          
          

          
          <div class="method-source-code" id="ffmpeg_version_line-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 475</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">ffmpeg_version_line</span>
  <span class="ruby-ivar">@ff_versionline</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-fire" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">fire</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method runs the FFmpeg conversion process in a separate thread. First
it initializes processing percentage and then spawns a new thread, in which
FFmpeg conversion process is spawned through Open3.popen2e. It sets the
processing status, passes the command output to <a
href="OutputReader.html">OutputReader</a> instance and initializes all the
needed structures for information. Then it parses the output until it ends
to extract the information, which is available through this class&#39;
getter methods. All the information is filled in as soon as it appears in
the command output. When the process finishes, it cleans up the streams,
sets percentage to 100% and gets the command&#39; s exit status. Then it
sets :completed or :failed status according to the command&#39; s status.
At the end it catches and displays any exceptions that can occur in the
thread</p>
          
          

          
          <div class="method-source-code" id="fire-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 46</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">fire</span>
  <span class="ruby-ivar">@processing_percentage</span> = <span class="ruby-value">0</span>
  <span class="ruby-ivar">@processing_thread</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">th</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">begin</span>
      <span class="ruby-constant">Open3</span>.<span class="ruby-identifier">popen2e</span>(<span class="ruby-ivar">@command</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">progin</span>, <span class="ruby-identifier">progout</span>, <span class="ruby-identifier">progthread</span><span class="ruby-operator">|</span>
        <span class="ruby-ivar">@status</span> = <span class="ruby-value">:processing</span>
        <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:normal</span>
        <span class="ruby-identifier">outputreader</span> = <span class="ruby-constant">OutputReader</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">progout</span>)
        <span class="ruby-ivar">@rawoutput</span> = []
        <span class="ruby-ivar">@input_meta_common</span> = {}
        <span class="ruby-ivar">@input_meta_audio</span> = {}
        <span class="ruby-ivar">@input_meta_video</span> = {}
        <span class="ruby-ivar">@output_meta_common</span> = {}
        <span class="ruby-ivar">@output_meta_audio</span> = {}
        <span class="ruby-ivar">@output_meta_video</span> = {}
        <span class="ruby-ivar">@processing_status</span> = {}
        <span class="ruby-keyword">begin</span>
          <span class="ruby-comment">#puts &quot;DEBUG: Processing next line...&quot;</span>
          <span class="ruby-identifier">line</span> = <span class="ruby-identifier">outputreader</span>.<span class="ruby-identifier">gets</span>([<span class="ruby-string">&quot;\n&quot;</span>, <span class="ruby-string">&quot;\r&quot;</span>])
          <span class="ruby-identifier">line</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">chomp!</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">line</span>.<span class="ruby-identifier">nil?</span>
          <span class="ruby-comment">#puts &quot;DEBUG: Line: &quot; + line.to_s</span>
          <span class="ruby-comment">#puts &quot;DEBUG: Raw OutputReader buffer content: &quot;</span>
          <span class="ruby-comment">#puts outputreader.get_raw_buffer</span>
          <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">line</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">!=</span> <span class="ruby-string">&quot;EOF&quot;</span>
            <span class="ruby-comment">#puts &quot;DEBUG: Adding line to rawoutput...&quot;</span>
            <span class="ruby-ivar">@rawoutput</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">line</span>
            <span class="ruby-comment"># Getting rid of unnecessary indentation spaces</span>
            <span class="ruby-comment">#puts &quot;DEBUG: Removing unnecessary spaces...&quot;</span>
            <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-regexp">/^[ ]+/</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
              <span class="ruby-identifier">line</span>[<span class="ruby-regexp">/^[ ]+/</span>] = <span class="ruby-string">&quot;&quot;</span>
            <span class="ruby-keyword">end</span>
            <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-regexp">/[ ]+/</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
              <span class="ruby-identifier">line</span>[<span class="ruby-regexp">/[ ]+/</span>] = <span class="ruby-string">&quot; &quot;</span>
            <span class="ruby-keyword">end</span>
            <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-regexp">/[ ]+$/</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
              <span class="ruby-identifier">line</span>[<span class="ruby-regexp">/[ ]+$/</span>] = <span class="ruby-string">&quot;&quot;</span>
            <span class="ruby-keyword">end</span>
            <span class="ruby-identifier">line</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">/=[ ]+/</span>, <span class="ruby-string">&quot;=&quot;</span>)
            <span class="ruby-comment"># Parsing</span>
            <span class="ruby-comment">#puts &quot;DEBUG: Line after spaces removal: &quot; + line.to_s</span>
            <span class="ruby-comment">#puts &quot;DEBUG: Parsing line...&quot;</span>
            <span class="ruby-keyword">if</span> <span class="ruby-ivar">@conversion_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:audio</span>
              <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parser_status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:meta</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Parser in metadata parsing mode&quot;</span>
                <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">7</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Duration&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Stream&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;[&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Output&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Input&quot;</span>
                  <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:normal</span>
                <span class="ruby-keyword">else</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Reading metadata line...&quot;</span>
                  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@last_met_io</span> <span class="ruby-operator">==</span> <span class="ruby-value">:input</span>
                    <span class="ruby-ivar">@input_meta_audio</span>[<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;:&quot;</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">downcase</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>].<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;:&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_met_io</span> <span class="ruby-operator">==</span> <span class="ruby-value">:output</span>
                    <span class="ruby-ivar">@output_meta_audio</span>[<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;:&quot;</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">downcase</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>].<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;:&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-keyword">end</span>
                <span class="ruby-keyword">end</span>
              <span class="ruby-keyword">end</span>
              <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parser_status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:strmap</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Parser in stream mapping parsing mode&quot;</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Reading stream mapping information...&quot;</span>
                <span class="ruby-ivar">@stream_mapping_audio</span> = <span class="ruby-identifier">line</span>[<span class="ruby-value">21</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>]
                <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:retnormal</span>
              <span class="ruby-keyword">end</span>
              <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parser_status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:normal</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Parser in normal mode&quot;</span>
                <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;ffmpeg&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached version line&quot;</span>
                  <span class="ruby-ivar">@ff_versionline</span> = <span class="ruby-identifier">line</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;built&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached build line&quot;</span>
                  <span class="ruby-ivar">@ff_buildline</span> = <span class="ruby-identifier">line</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Input&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached input declaration&quot;</span>
                  <span class="ruby-ivar">@input_type</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-ivar">@last_met_io</span> = <span class="ruby-value">:input</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Output&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached output declaration&quot;</span>
                  <span class="ruby-ivar">@detected_output_type</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-ivar">@last_met_io</span> = <span class="ruby-value">:output</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Metadata:&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached metadata start&quot;</span>
                  <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:meta</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">7</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Duration&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached duration line&quot;</span>
                  <span class="ruby-ivar">@input_duration</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">0</span>][<span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;start&quot;</span>
                    <span class="ruby-comment">#puts &quot;DEBUG: Detected start variation of the line&quot;</span>
                    <span class="ruby-ivar">@input_start</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">6</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-ivar">@input_bitrate</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">2</span>][<span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-keyword">else</span>
                    <span class="ruby-comment">#puts &quot;DEBUG: Detected only bitrate variation of the line&quot;</span>
                    <span class="ruby-ivar">@input_bitrate</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-keyword">end</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Stream mapping:&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached stream mapping declaration&quot;</span>
                  <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:strmap</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Stream&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached stream information line&quot;</span>
                  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@last_met_io</span> <span class="ruby-operator">==</span> <span class="ruby-value">:input</span>
                    <span class="ruby-ivar">@audio_input_format</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">0</span>][<span class="ruby-value">20</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-ivar">@audio_input_freq</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-ivar">@audio_input_channelmode</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">2</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-ivar">@audio_input_format_type</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">3</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">4</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
                      <span class="ruby-ivar">@audio_input_bitrate2</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">4</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-keyword">end</span>
                  <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_met_io</span> <span class="ruby-operator">==</span> <span class="ruby-value">:output</span>
                    <span class="ruby-ivar">@audio_output_format</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">0</span>][<span class="ruby-value">20</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-ivar">@audio_output_freq</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-ivar">@audio_output_channelmode</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">2</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-ivar">@audio_output_format_type</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">3</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">4</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
                      <span class="ruby-ivar">@audio_output_bitrate2</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">4</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-keyword">end</span>
                  <span class="ruby-keyword">end</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">3</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;size&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached processing status line&quot;</span>
                  <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot; &quot;</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spl</span><span class="ruby-operator">|</span>
                    <span class="ruby-ivar">@processing_status</span>[<span class="ruby-identifier">spl</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;=&quot;</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">spl</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;=&quot;</span>)[<span class="ruby-value">1</span>]
                  <span class="ruby-keyword">end</span>
                  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@processing_status</span>[<span class="ruby-value">:time</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@input_duration</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
                    <span class="ruby-ivar">@processing_percentage</span> = ((((<span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-ivar">@processing_status</span>[<span class="ruby-value">:time</span>])<span class="ruby-operator">-</span><span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">&quot;0:0&quot;</span>))<span class="ruby-operator">/</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-ivar">@input_duration</span>)<span class="ruby-operator">-</span><span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">&quot;0:0&quot;</span>)))).<span class="ruby-identifier">round</span>(<span class="ruby-value">2</span>)<span class="ruby-operator">*</span><span class="ruby-value">100</span>).<span class="ruby-identifier">to_i</span> <span class="ruby-comment">#/ This is for jEdit syntax highlighting to fix</span>
                  <span class="ruby-keyword">end</span>
                <span class="ruby-keyword">end</span>
              <span class="ruby-keyword">end</span>
              <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parser_status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:retnormal</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Parser returning to normal mode&quot;</span>
                <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:normal</span>
              <span class="ruby-keyword">end</span>
            <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@conversion_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:video</span>
              <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parser_status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:meta</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Parser in metadata parsing mode&quot;</span>
                <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">7</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Duration&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Stream&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;[&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Output&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Input&quot;</span>
                  <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:normal</span>
                <span class="ruby-keyword">else</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Reading metadata line...&quot;</span>
                  <span class="ruby-identifier">name</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;:&quot;</span>)[<span class="ruby-value">0</span>]
                  <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">name</span>.<span class="ruby-identifier">nil?</span>
                      <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">downcase</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>].<span class="ruby-identifier">to_sym</span>
                  <span class="ruby-keyword">else</span>
                      <span class="ruby-comment">#puts &quot;DEBUG: Skipping because of nil name...&quot;</span>
                      <span class="ruby-keyword">next</span>
                  <span class="ruby-keyword">end</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Name: #{name}&quot;</span>
                  <span class="ruby-identifier">value</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;:&quot;</span>)[<span class="ruby-value">1</span>]
                  <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
                      <span class="ruby-identifier">value</span> = <span class="ruby-string">&quot;&quot;</span>
                  <span class="ruby-keyword">else</span>
                      <span class="ruby-identifier">value</span> = <span class="ruby-identifier">value</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-keyword">end</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Value: #{value}&quot;</span>
                  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@last_met_io</span> <span class="ruby-operator">==</span> <span class="ruby-value">:input</span>
                    <span class="ruby-keyword">if</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
                      <span class="ruby-ivar">@input_meta_common</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
                    <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:audio</span>
                      <span class="ruby-ivar">@input_meta_audio</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
                    <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:video</span>
                      <span class="ruby-ivar">@input_meta_video</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
                    <span class="ruby-keyword">end</span>
                  <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_met_io</span> <span class="ruby-operator">==</span> <span class="ruby-value">:output</span>
                    <span class="ruby-keyword">if</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">nil</span>
                      <span class="ruby-ivar">@output_meta_common</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
                    <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:audio</span>
                      <span class="ruby-ivar">@output_meta_audio</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
                    <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:video</span>
                      <span class="ruby-ivar">@output_meta_video</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
                    <span class="ruby-keyword">end</span>
                  <span class="ruby-keyword">end</span>
                <span class="ruby-keyword">end</span>
              <span class="ruby-keyword">end</span>
             <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parser_status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:strmap</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Parser in stream mapping parsing mode&quot;</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Reading stream mapping information...&quot;</span>
                <span class="ruby-ivar">@stream_mapping_video</span> = <span class="ruby-identifier">line</span>[<span class="ruby-value">21</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>]
                <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:strmap2</span>
              <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@parser_status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:strmap2</span>
                <span class="ruby-ivar">@stream_mapping_audio</span> = <span class="ruby-identifier">line</span>[<span class="ruby-value">21</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>]
                <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:retnormal</span>
              <span class="ruby-keyword">end</span>
              <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parser_status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:normal</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Parser in normal mode&quot;</span>
                <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;ffmpeg&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached version line&quot;</span>
                  <span class="ruby-ivar">@ff_versionline</span> = <span class="ruby-identifier">line</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;built&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached build line&quot;</span>
                  <span class="ruby-ivar">@ff_buildline</span> = <span class="ruby-identifier">line</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Input&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached input declaration&quot;</span>
                  <span class="ruby-ivar">@input_type</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-ivar">@last_met_io</span> = <span class="ruby-value">:input</span>
                  <span class="ruby-ivar">@last_stream_type</span> = <span class="ruby-keyword">nil</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Output&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached output declaration&quot;</span>
                  <span class="ruby-ivar">@detected_output_type</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-ivar">@last_met_io</span> = <span class="ruby-value">:output</span>
                  <span class="ruby-ivar">@last_stream_type</span> = <span class="ruby-keyword">nil</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Metadata:&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached metadata start&quot;</span>
                  <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:meta</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">7</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Duration&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached duration line&quot;</span>
                  <span class="ruby-ivar">@input_duration</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">0</span>][<span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;start&quot;</span>
                    <span class="ruby-comment">#puts &quot;DEBUG: Detected start variation of the line&quot;</span>
                    <span class="ruby-ivar">@input_start</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">8</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-ivar">@input_bitrate</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">2</span>][<span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-keyword">else</span>
                    <span class="ruby-comment">#puts &quot;DEBUG: Detected only bitrate variation of the line&quot;</span>
                    <span class="ruby-ivar">@input_bitrate</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">10</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                  <span class="ruby-keyword">end</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Stream mapping:&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached stream mapping declaration&quot;</span>
                  <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:strmap</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Stream&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached stream information line&quot;</span>
                  <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">13</span><span class="ruby-operator">..</span><span class="ruby-value">17</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Video&quot;</span>
                    <span class="ruby-ivar">@last_stream_type</span> = <span class="ruby-value">:video</span>
                  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">13</span><span class="ruby-operator">..</span><span class="ruby-value">17</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Audio&quot;</span>
                    <span class="ruby-ivar">@last_stream_type</span> = <span class="ruby-value">:audio</span>
                  <span class="ruby-keyword">else</span>
                    <span class="ruby-ivar">@last_stream_type</span> = <span class="ruby-keyword">nil</span>
                  <span class="ruby-keyword">end</span>
                  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@last_met_io</span> <span class="ruby-operator">==</span> <span class="ruby-value">:input</span>
                    <span class="ruby-keyword">if</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:video</span>
                      <span class="ruby-ivar">@video_input_format</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">0</span>][<span class="ruby-value">20</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@video_input_colorspace</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@video_input_resolution</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">2</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@video_input_additional</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">3</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:audio</span>
                      <span class="ruby-ivar">@audio_input_format</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">0</span>][<span class="ruby-value">20</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@audio_input_freq</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@audio_input_channelmode</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">2</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@audio_input_format_type</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">3</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">4</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
                        <span class="ruby-ivar">@audio_input_bitrate2</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">4</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-keyword">end</span>
                    <span class="ruby-keyword">end</span>
                  <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_met_io</span> <span class="ruby-operator">==</span> <span class="ruby-value">:output</span>
                    <span class="ruby-keyword">if</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:video</span>
                      <span class="ruby-ivar">@video_output_format</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">0</span>][<span class="ruby-value">20</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@video_output_colorspace</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@video_output_resolution</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">2</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@video_output_additional</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">3</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                    <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@last_stream_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:audio</span>
                      <span class="ruby-ivar">@audio_output_format</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">0</span>][<span class="ruby-value">20</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@audio_output_freq</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">1</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@audio_output_channelmode</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">2</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-ivar">@audio_output_format_type</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">3</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">4</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
                        <span class="ruby-ivar">@audio_output_bitrate2</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;,&quot;</span>)[<span class="ruby-value">4</span>][<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
                      <span class="ruby-keyword">end</span>
                    <span class="ruby-keyword">end</span>
                  <span class="ruby-keyword">end</span>
                <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;frame&quot;</span>
                  <span class="ruby-comment">#puts &quot;DEBUG: Approached processing status line&quot;</span>
                  <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot; &quot;</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spl</span><span class="ruby-operator">|</span>
                    <span class="ruby-ivar">@processing_status</span>[<span class="ruby-identifier">spl</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;=&quot;</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">spl</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;=&quot;</span>)[<span class="ruby-value">1</span>]
                  <span class="ruby-keyword">end</span>
                  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@processing_status</span>[<span class="ruby-value">:time</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@processing_status</span>[<span class="ruby-value">:time</span>] <span class="ruby-operator">!=</span> <span class="ruby-string">&quot;N/A&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@input_duration</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@input_duration</span> <span class="ruby-operator">!=</span> <span class="ruby-string">&quot;N/A&quot;</span>
                    <span class="ruby-ivar">@processing_percentage</span> = ((((<span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-ivar">@processing_status</span>[<span class="ruby-value">:time</span>])<span class="ruby-operator">-</span><span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">&quot;0:0&quot;</span>))<span class="ruby-operator">/</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-ivar">@input_duration</span>)<span class="ruby-operator">-</span><span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">&quot;0:0&quot;</span>)))).<span class="ruby-identifier">round</span>(<span class="ruby-value">2</span>)<span class="ruby-operator">*</span><span class="ruby-value">100</span>).<span class="ruby-identifier">to_i</span> <span class="ruby-comment">#/ This is for jEdit syntax highlighting to fix</span>
                  <span class="ruby-keyword">end</span>
                <span class="ruby-keyword">end</span>
              <span class="ruby-keyword">end</span>
              <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parser_status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:retnormal</span>
                <span class="ruby-comment">#puts &quot;DEBUG: Parser returning to normal mode&quot;</span>
                <span class="ruby-ivar">@parser_status</span> = <span class="ruby-value">:normal</span>
              <span class="ruby-keyword">end</span>
            <span class="ruby-keyword">end</span>
          <span class="ruby-keyword">end</span>
        <span class="ruby-keyword">end</span> <span class="ruby-keyword">while</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">!=</span> <span class="ruby-string">&quot;EOF&quot;</span>
        <span class="ruby-comment">#puts &quot;DEBUG: After EOF, closing streams...&quot;</span>
        <span class="ruby-identifier">progout</span>.<span class="ruby-identifier">close</span>
        <span class="ruby-identifier">progin</span>.<span class="ruby-identifier">close</span>
        <span class="ruby-identifier">progthread</span>.<span class="ruby-identifier">join</span>
        <span class="ruby-identifier">progst</span> = <span class="ruby-identifier">progthread</span>.<span class="ruby-identifier">value</span>
        <span class="ruby-ivar">@exit_status</span> = <span class="ruby-identifier">progst</span>.<span class="ruby-identifier">exitstatus</span>
        <span class="ruby-comment">#puts &quot;Got output status: #{progst.exitstatus}&quot;</span>
        <span class="ruby-keyword">if</span> <span class="ruby-identifier">progst</span>.<span class="ruby-identifier">success?</span>
          <span class="ruby-ivar">@status</span> = <span class="ruby-value">:completed</span>
          <span class="ruby-ivar">@processing_percentage</span> = <span class="ruby-value">100</span>
        <span class="ruby-keyword">else</span>
          <span class="ruby-ivar">@status</span> = <span class="ruby-value">:failed</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">if</span> <span class="ruby-ivar">@status</span> <span class="ruby-operator">==</span> <span class="ruby-value">:failed</span>
        <span class="ruby-identifier">raise</span> <span class="ruby-constant">RFF</span><span class="ruby-operator">::</span><span class="ruby-constant">ProcessingFailure</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@exit_status</span>, <span class="ruby-string">&quot;Inspect the output as FFmpeg returned with status: &quot;</span>)
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
      <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;Caught exception: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>
      <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;Backtrace:&quot;</span>
      <span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">backtrace</span>
      <span class="ruby-ivar">@status</span> = <span class="ruby-value">:failed</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-format_processing_percentage" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">format_processing_percentage</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns percentage of process completion formatted for output</p>
          
          

          
          <div class="method-source-code" id="format_processing_percentage-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 625</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">format_processing_percentage</span>
  <span class="ruby-ivar">@processing_percentage</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-string">&quot;0%&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@processing_percentage</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot;%&quot;</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-full_output_path" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">full_output_path</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns full path to the output file</p>
          
          

          
          <div class="method-source-code" id="full_output_path-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 397</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">full_output_path</span>
  <span class="ruby-node">&quot;#{@output_path}/#{@output_name}.#{@output_type.to_s}&quot;</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-input" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">input</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns full input path</p>
          
          

          
          <div class="method-source-code" id="input-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 343</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">input</span>
  <span class="ruby-ivar">@input</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-input_bitrate" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">input_bitrate</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns input bitrate (from the duration line)</p>
          
          

          
          <div class="method-source-code" id="input_bitrate-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 505</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">input_bitrate</span>
  <span class="ruby-ivar">@input_bitrate</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-input_duration" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">input_duration</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns input duration</p>
          
          

          
          <div class="method-source-code" id="input_duration-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 493</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">input_duration</span>
  <span class="ruby-ivar">@input_duration</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-input_start" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">input_start</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns start point of the input</p>
          
          

          
          <div class="method-source-code" id="input_start-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 499</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">input_start</span>
  <span class="ruby-ivar">@input_start</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-input_type" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">input_type</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns input type detected by FFmpeg</p>
          
          

          
          <div class="method-source-code" id="input_type-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 487</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">input_type</span>
  <span class="ruby-ivar">@input_type</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-kill" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">kill</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method kills processing thread and sets status to :aborted</p>
          
          

          
          <div class="method-source-code" id="kill-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 637</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">kill</span>
  <span class="ruby-ivar">@processing_thread</span>.<span class="ruby-identifier">kill</span>
  <span class="ruby-ivar">@status</span> = <span class="ruby-value">:aborted</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-output_name" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">output_name</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns full output name</p>
          
          

          
          <div class="method-source-code" id="output_name-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 361</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">output_name</span>
  <span class="ruby-ivar">@output_name</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-output_path" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">output_path</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns path where the output is (being) saved</p>
          
          

          
          <div class="method-source-code" id="output_path-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 367</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">output_path</span>
  <span class="ruby-ivar">@output_path</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-output_type" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">output_type</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns output type read from the filename</p>
          
          

          
          <div class="method-source-code" id="output_type-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 349</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">output_type</span>
  <span class="ruby-ivar">@output_type</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-parser_status" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">parser_status</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns current output parser status</p>
          
          

          
          <div class="method-source-code" id="parser_status-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 415</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">parser_status</span>
  <span class="ruby-ivar">@parser_status</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-processing_percentage" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">processing_percentage</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns percentage of process completion</p>
          
          

          
          <div class="method-source-code" id="processing_percentage-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 619</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">processing_percentage</span>
  <span class="ruby-ivar">@processing_percentage</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-processing_status" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">processing_status</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns a hash which represents current processing status (eg.
frames processed, time processed etc.) with keys being symbols representing
each status value</p>
          
          

          
          <div class="method-source-code" id="processing_status-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 457</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">processing_status</span>
  <span class="ruby-ivar">@processing_status</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-quality" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">quality</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns used video quality</p>
          
          

          
          <div class="method-source-code" id="quality-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 373</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">quality</span>
  <span class="ruby-ivar">@quality</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-raw_command_output" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">raw_command_output</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns raw command output as an array of lines after getting
rid of unneeded whitespaces</p>
          
          

          
          <div class="method-source-code" id="raw_command_output-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 403</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">raw_command_output</span>
  <span class="ruby-ivar">@rawoutput</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-status" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">status</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns current processing status (:pending, :processing,
:completed, :failed, :aborted)</p>
          
          

          
          <div class="method-source-code" id="status-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 409</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">status</span>
  <span class="ruby-ivar">@status</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_input_additional" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_input_additional</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns additional information about video input as an array of
values</p>
          
          

          
          <div class="method-source-code" id="video_input_additional-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 589</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_input_additional</span>
  <span class="ruby-ivar">@video_input_additional</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_input_colorspace" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_input_colorspace</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns color space of video input</p>
          
          

          
          <div class="method-source-code" id="video_input_colorspace-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 577</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_input_colorspace</span>
  <span class="ruby-ivar">@video_input_colorspace</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_input_format" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_input_format</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns format of video input</p>
          
          

          
          <div class="method-source-code" id="video_input_format-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 571</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_input_format</span>
  <span class="ruby-ivar">@video_input_format</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_input_metadata" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_input_metadata</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns metadata for video input stream as a hash with keys
being symbols representing each metadata downcased name</p>
          
          

          
          <div class="method-source-code" id="video_input_metadata-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 433</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_input_metadata</span>
  <span class="ruby-ivar">@input_meta_video</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_input_resolution" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_input_resolution</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns resolution of video input</p>
          
          

          
          <div class="method-source-code" id="video_input_resolution-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 583</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_input_resolution</span>
  <span class="ruby-ivar">@video_input_resolution</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_output_additional" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_output_additional</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns additional information about video output as an array
of values</p>
          
          

          
          <div class="method-source-code" id="video_output_additional-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 613</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_output_additional</span>
  <span class="ruby-ivar">@video_output_additional</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_output_colorspace" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_output_colorspace</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns color space of video output</p>
          
          

          
          <div class="method-source-code" id="video_output_colorspace-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 601</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_output_colorspace</span>
  <span class="ruby-ivar">@video_output_colorspace</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_output_format" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_output_format</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns format of video output</p>
          
          

          
          <div class="method-source-code" id="video_output_format-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 595</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_output_format</span>
  <span class="ruby-ivar">@video_output_format</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_output_metadata" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_output_metadata</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns metadata for video output stream as a hash with keys
being symbols representing each metadata downcased name</p>
          
          

          
          <div class="method-source-code" id="video_output_metadata-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 451</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_output_metadata</span>
  <span class="ruby-ivar">@output_meta_video</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_output_resolution" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_output_resolution</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns resolution of video output</p>
          
          

          
          <div class="method-source-code" id="video_output_resolution-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 607</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_output_resolution</span>
  <span class="ruby-ivar">@video_output_resolution</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-i-video_stream_mapping" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">video_stream_mapping</span><span
            class="method-args">()</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This method returns video stream mapping information (input_format -&gt;
output_format)</p>
          
          

          
          <div class="method-source-code" id="video_stream_mapping-source">
            <pre><span class="ruby-comment"># File lib/processor.rb, line 469</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">video_stream_mapping</span>
  <span class="ruby-ivar">@stream_mapping_video</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
    </section>
  
  </section>
</main>


<footer id="validator-badges" role="contentinfo">
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
  <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>

